/*
* Tencent is pleased to support the open source community by making WeUI available.
* 
* Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved.
* 
* Licensed under the MIT License (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* 
*       http://opensource.org/licenses/MIT
* 
* Unless required by applicable law or agreed to in writing, software distributed under the License is
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language governing permissions and
* limitations under the License.
*/

@import "../../../base/fn";

.weui-cell_select {
  padding: 0;

  .weui-cell__bd {
    &::after {
      content: " ";
      width: 12px;
      height: 24px;
      mask-position: 0 0;
      mask-repeat: no-repeat;
      mask-size: 100%;
      background-color: currentColor;
      color: @weuiTextColorTips;
      mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2212%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M2.454%206.58l1.06-1.06%205.78%205.779a.996.996%200%20010%201.413l-5.78%205.779-1.06-1.061%205.425-5.425-5.425-5.424z%22%20fill%3D%22%23B2B2B2%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E);
      position: absolute;
      top: 50%;
      right: @weuiCellGapH;
      margin-top: -12px;
    }
  }
}

.weui-select {
  -webkit-appearance: none;
  border: 0;
  outline: 0;
  background-color: transparent;
  width: 100%;
  font-size: inherit;
  min-height: @weuiCellHeight;
  line-height: @weuiCellHeight;
  position: relative;
  z-index: 1;
  padding-left: @weuiCellGapH;
  padding-right: @weuiCellGapH + 24px;
  color: var(--weui-FG-0);
  vertical-align: bottom;
  box-sizing: border-box;

  div& {
    .ellipsis;
  }
}

.weui-cell_select-before {
  .weui-cell__hd {
    padding-left: 0;
    position: relative;
    &::after {
      .setRightLine(@weuiCellBorderColor);
    }
    &::before {
      content: " ";
      width: 12px;
      height: 24px;
      mask-position: 0 0;
      mask-repeat: no-repeat;
      mask-size: 100%;
      background-color: currentColor;
      color: @weuiTextColorTips;
      mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2212%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M2.454%206.58l1.06-1.06%205.78%205.779a.996.996%200%20010%201.413l-5.78%205.779-1.06-1.061%205.425-5.425-5.425-5.424z%22%20fill%3D%22%23B2B2B2%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E);
      position: absolute;
      top: 50%;
      right: @weuiCellGapH;
      margin-top: -12px;
    }
  }
  .weui-cell__bd {
    padding-left: @weuiCellGapH;
    &::after {
      display: none;
    }
  }
  .weui-select {
    max-width: 5em;
    width: @weuiCellLabelWidth;
    box-sizing: content-box;
  }
}

.weui-cell_select-after {
  .weui-cell__hd {
    padding-left: @weuiCellGapH;
  }
  .weui-select {
    padding-left: 0;
  }
}
